<?php

namespace App\Http\Controllers;

use Illuminate\Support\Facades\DB;

class CallBaseController extends Controller
{
    public function __construct()
    {
        //电话配置
        $setting_id = DB::table('phone_settings')->where('status',1)->first();
        if(empty($setting_id)){
            header('Content-Type:application/json; charset=utf-8');
            $msg = json_encode(['error' => '请开启电话配置', 'status_code' => 422]);
            http_response_code(422);
            echo $msg;die;
        }
    }
}
